home *** CD-ROM | disk | FTP | other *** search
/ Java Primer Plus / Java Primer Plus (Waite Group Proess)(1996).iso / java_Win / demo / GraphicsTest / GraphicsCards.class (.txt) < prev    next >
Encoding:
Java Class File  |  1995-12-04  |  845 b   |  15 lines

  1. import java.awt.CardLayout;
  2. import java.awt.Container;
  3. import java.awt.Panel;
  4.  
  5. class GraphicsCards extends Panel {
  6.    public GraphicsCards() {
  7.       ((Container)this).setLayout(new CardLayout());
  8.       ((Container)this).add("Arc", new ArcCard());
  9.       ((Container)this).add("Oval", new ShapeTest(new OvalShape()));
  10.       ((Container)this).add("Polygon", new ShapeTest(new PolygonShape()));
  11.       ((Container)this).add("Rect", new ShapeTest(new RectShape()));
  12.       ((Container)this).add("RoundRect", new ShapeTest(new RoundRectShape()));
  13.    }
  14. }
  15.